Dear IBM Community,
i'm struggling a bit with Rational DOORS and the DXL-language. We want to query requirement specifications out of existing specification books. (Later the DXL-file is a parameter passed to the doors.exe in a command line for execution what is already working in principal) Our structure is as follows:
We have a Project [12121_2-PROJ02] with a folder [20_12121_folder1] in it:
There are specification books in the folder [20_12121_folder1] and a few others in the subsequent folders. Here is an example specification book:
We want to query all specification books on all levels within this structure. It should also be possible to limit the query by querying only for a list of attributes. Finally we want to export these values to a comma separated file (csv) for later processing like this:
To query modules I found this article: Unfortunately I didn't have luck with it...
Can someone of you please provide a piece of code or a link to achieve this?
Kind regards from Germany,
Joerg
it_consultant - Thu Aug 20 09:45:13 EDT 2015 |
Re: Query requirement specifications of specification books Some sample code to get you started.
Folder f = current
Item i
for i in f do
{
if ( type(i) == "Formal" && !isDeleted(i) )
{
string modName = fullName( i )
Module m = read( modName, false, true )
if ( !null m )
{
Object o
for o in m do
{
print identifier( o ) "\n"
}
close( m )
}
}
}
|
Re: Query requirement specifications of specification books a8155058 - Wed Aug 26 11:37:58 EDT 2015 Some sample code to get you started.
Folder f = current
Item i
for i in f do
{
if ( type(i) == "Formal" && !isDeleted(i) )
{
string modName = fullName( i )
Module m = read( modName, false, true )
if ( !null m )
{
Object o
for o in m do
{
print identifier( o ) "\n"
}
close( m )
}
}
}
Hi @a8155058 28e4aa55-4cf5-4d0d-90cf-dde257eeef7e
i had a little troubles with my account... Now i'm good to say thank you very much!
I already did a few things with your code example and it turns out to be pretty fine with your code.
It is possible that I have one or two further questions but so far everything is perfect :)
Thanks & Kind regards,
Joerg |